/**
 * 
 */
package sopia.sg;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TabHost;

/**
 * @author tatsu@gmail.com
 *
 */
public class G006Activity extends TabActivity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		  super.onCreate(savedInstanceState);
		    setContentView(R.layout.g006_layout);

		    Resources res = getResources(); // Resource object to get Drawables
		    TabHost tabHost = getTabHost();  // The activity TabHost
		    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
		    Intent intent;  // Reusable Intent for each tab

		    // Create an Intent to launch an Activity for the tab (to be reused)
		    intent = new Intent().setClass(this, TabAccountActivity.class);

		    // Initialize a TabSpec for each tab and add it to the TabHost
		    spec = tabHost.newTabSpec("accounts").setIndicator("Accounts",
		                      res.getDrawable(R.drawable.ic_tab_accounts))
		                  .setContent(intent);
		    tabHost.addTab(spec);

		    // Do the same for the other tabs
		    intent = new Intent().setClass(this, TabCategoryActivity.class);
		    spec = tabHost.newTabSpec("categories").setIndicator("Categories",
		                      res.getDrawable(R.drawable.ic_tab_categories))
		                  .setContent(intent);
		    tabHost.addTab(spec);

		    intent = new Intent().setClass(this, TabTypeExpenseActivity.class);
		    spec = tabHost.newTabSpec("types").setIndicator("Types Expense",
		                      res.getDrawable(R.drawable.ic_tab_types))
		                  .setContent(intent);
		    tabHost.addTab(spec);

		    tabHost.setCurrentTab(0);	    
	}
	
}
